<template>
	<view class="yb-empty yb-flex yb-align-center yb-justify-center" :id="customIdSync" :class="customClassSync" :style="customStyleSync">
		<slot>
			<yb-icon :name="'empty-' + type" :color="color" :size="size"></yb-icon>
			<text class="no-title" v-if="text" :style="{color: color}">{{text}}</text>
		</slot>
	</view>
</template>

<script>
	import ComponentMixin from '../../js_sdk/componentMixin.js'
	import Util from '../../js_sdk/util.js'
	export default {
		mixins: [ComponentMixin],
		props: {
			text: {
				type: String,
				default: '暂无数据'
			},
			color: {
				type: String,
				default: '#8A96A3'
			},
			size: {
				type: [String,Number],
				default: '100rpx'
			},
			type: {
				type: String,
				default: 'order'
			}
		},
		computed: {
			Util () {
				return Util
			}
		}
	}
</script>

<style scoped>
	.yb-empty .no-img {
		width: 300rpx;
		height: 150rpx;
	}
	.yb-empty .no-title {
		text-align: center;
		font-size: 30rpx;
		margin-top: 15rpx;
	}
</style>
